home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / progut~1 / gperf.zoo / src / list-node.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-09-25  |  1.8 KB  |  43 lines

  1. /* This may look like C code, but it is really -*- C++ -*- */
  2.  
  3. /* Data and function members for defining values and operations of a list node.
  4.  
  5.    Copyright (C) 1989 Free Software Foundation, Inc.
  6.    written by Douglas C. Schmidt (schmidt@ics.uci.edu)
  7.  
  8. This file is part of GNU GPERF.
  9.  
  10. GNU GPERF is free software; you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation; either version 1, or (at your option)
  13. any later version.
  14.  
  15. GNU GPERF is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. GNU General Public License for more details.
  19.  
  20. You should have received a copy of the GNU General Public License
  21. along with GNU GPERF; see the file COPYING.  If not, write to
  22. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  23.  
  24. #pragma once
  25. #include "std-err.h"
  26. #include "vectors.h"
  27.  
  28. struct List_Node : private Std_Err, private Vectors
  29.   List_Node  *link;              /* TRUE if key has an identical KEY_SET as another key. */
  30.   List_Node  *next;              /* Points to next element on the list. */
  31.   char       *key;               /* Each keyword string stored here. */
  32.   char       *rest;              /* Additional information for building hash function. */
  33.   char       *char_set;          /* Set of characters to hash, specified by user. */
  34.   int         length;            /* Length of the key. */
  35.   int         hash_value;        /* Hash value for the key. */
  36.   int         occurrence;        /* A metric for frequency of key set occurrences. */
  37.   int         index;             /* Position of this node relative to other nodes. */
  38.  
  39.               List_Node (char *key, int len);
  40.   static void set_sort (char *base, int len);
  41. };
  42.